#ifndef _HFTREE__H_
#define _HFTREE__H_

#define MAX_SIZE  1000

typedef struct {
	int weight;
	//结点权值
	int parent, lchild, rchild;//结点的双亲、左孩子、右孩子
}HTNode, * HuffmanTree; //动态分配数组存储哈夫曼树

int alphabet(char* str, int* count);
HuffmanTree tree_Create(int n);
void tree_Voluate(HuffmanTree HFtree, int* count);
void HFtree_Build(HuffmanTree HFtree, int n, char* str, int* count);
void HFtree_Code(HuffmanTree HFtree, int num, char** arr);
void HuffmanDeCode(HuffmanTree HT, char* s, char a[], int n);


#endif // !_HFTREE__H_

